
model.m.3.i.p <- plm(inclprop~past.conference.number.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party + gwf_military+first.leader+leader.size+maj.leader+leader.time.in.office+leader.historical.count, data=epr.final[is.na(epr.final$inclprop)==FALSE,],index=c("countries_gwid","year"),model="within",effect="twoways")
summary(model.m.3.i.p) 

model.m.3.i.pop <- plm(legippop~past.conference.number.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party + gwf_military+first.leader+leader.size+maj.leader+leader.time.in.office+leader.historical.count, data=epr.final[is.na(epr.final$inclprop)==FALSE,],index=c("countries_gwid","year"),model="within",effect="twoways")
summary(model.m.3.i.pop) 

model.m.4.i.p <- plm(inclprop~past.conference.number.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party + gwf_military+first.leader+leader.size+maj.leader+leader.time.in.office+leader.historical.count+timeSinceLastCoup, data=epr.final[is.na(epr.final$inclprop)==FALSE,],index=c("countries_gwid","year"),model="within",effect="twoways")
summary(model.m.4.i.p) 

model.m.4.i.pop <- plm(legippop~past.conference.number.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party + gwf_military+first.leader+leader.size+maj.leader+leader.time.in.office+leader.historical.count+timeSinceLastCoup, data=epr.final[is.na(epr.final$inclprop)==FALSE,],index=c("countries_gwid","year"),model="within",effect="twoways")
summary(model.m.4.i.pop) 

coef.Names.2.m <- c("Conference Attendance","Civil War","GDP per capita","Polity","Personalist Regime","Party Regime","Military Regime","First Leader","Leader Group Size","Ethnic Majority Leader","Leader Time in Office","Leader Count","Time Since Last Coups")
model.Names.2.m <- c("Proportion incl. groups","Proportion incl. pop","Proportion incl. groups","Proportion incl. pop")

print(
texreg(list(model.m.3.i.p,model.m.3.i.pop,model.m.4.i.p,model.m.4.i.pop),use.packages=FALSE,dcolumn=TRUE,custom.coef.names=coef.Names.2.m,custom.model.names=model.Names.2.m,stars = c(0.01, 0.05, 0.1),digits=3,scalebox=0.7,caption="Ethnic Majority Leader Models. Linear fixed effects models include a binary indicator of whether government leader is from the largest ethnic groups in a country. Outcome variables: Proportion of included groups/population. Unit of analysis is the country-year. All models include year and country fixed effects.",label="table:mainTable:maj",caption.above=TRUE)
)
